//
//  BaseViewController.m
//
//
//  Created by Fidetro on 16/9/22.
//  Copyright © 2016年 Fidetro. All rights reserved.
//

#import <UIKit/UIKit.h>
typedef void(^UPLOADPATH_BLOCK)(NSString *imagePath);

#define AlertContent(content) \
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" \
message:content \
delegate:nil   \
cancelButtonTitle:@"确定" \
otherButtonTitles:nil];  \
[alert show];  \

@interface BaseViewController : UIViewController<UITextFieldDelegate>

@property (nonatomic,strong) UIButton *leftButton;
@property (nonatomic,strong) UIButton *rightButton;
/** 中间btn **/
@property(nonatomic,strong) UIButton *centButton;

/** 返回上传图片地址的block **/
@property(nonatomic,copy) UPLOADPATH_BLOCK uploadPath_block;
/**
 设置导航栏标题
 
 @param title      标题
 @param titleColor 字体颜色
 */
- (void)setNavigationTitle:(NSString *)title titleColor:(UIColor *)titleColor;


/**
 特殊导航标题

 @param image 图片
 */
- (void)setCentImage:(UIImage *)image;

/**
 空实现 写导航栏的地方
 */
- (void)setNavigationStyle;

/**
 隐藏导航栏底部的线
 */
- (void)hideNavigationBottomLine;


/**
 空方法
 */
- (void)masLayoutSubview;

/**
 隐藏导航栏
 */
- (void)hideNavigationBar;

/**
 设置导航栏左侧按钮标题
 
 @param title 标题
 */
- (void)setLeftButtonTitle:(NSString *)title;


/**
 设置导航栏左侧按钮图片
 
 @param image 图片
 */
- (void)setLeftButtonImage:(UIImage *)image;

/**
 设置导航栏右侧按钮标题
 
 @param title 标题
 */
- (void)setRightButtonTitle:(NSString *)title;

/**
 设置导航栏右侧按钮图片
 
 @param image 图片
 */
- (void)setRightButtonImage:(UIImage *)image;

/**
 空实现 左侧按钮点击事件
 
 @param sender button
 */
- (void)onLeftButtonClick:(id)sender;

/**
 空实现 右侧按钮点击事件
 
 @param sender button
 */
- (void)onRightButtonClick:(id)sender;


/**
 写在分类的方法
 
 @param path_block 返回图片路径
 */
- (void)createActionSheetWithImagePath:(UPLOADPATH_BLOCK)path_block;

@end
